/*
 * Copyright (C) 2010-2011 Enrique Lara (enrique.posix2.lara@gmail.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
 * limitations under the License.
  */
package trs.wmata;

import app.timetogo.model.Route;
import app.timetogo.model.Stop;
import static trs.wmata.TrainLine.BLUE;
import static trs.wmata.TrainLine.GREEN;
import static trs.wmata.TrainLine.ORANGE;
import static trs.wmata.TrainLine.RED;
import static trs.wmata.TrainLine.YELLOW;
public enum TrainStation implements Stop {
    ADDISON_ROAD_SEAT_PLEASANT("G03", null, 92, "Addison Road-Seat Pleasant", false, BLUE),
    ANACOSTIA("F06", null, 85, "Anacostia", false, GREEN),
    ARCHIVES_NAVY_MEMORIAL_PENN_QUARTER("F02", null, 81, "Archives-Navy Memorial-Penn Quarter", false, GREEN, YELLOW),
    ARLINGTON_CEMETERY("C06", null, 42, "Arlington Cemetery", false, BLUE),
    BALLSTON_MU("K04", null, 99, "Ballston-MU", false, ORANGE),
    BENNING_ROAD("G01", null, 90, "Benning Road", false, BLUE),
    BETHESDA("A09", null, 12, "Bethesda", false, RED),
    BRADDOCK_ROAD("C12", null, 47, "Braddock Road", false, BLUE, YELLOW),
    BRANCH_AVE("F11", null, 89, "Branch Ave", true, GREEN),
    BROOKLAND_CUA("B05", null, 27, "Brookland-CUA", false, RED),
    CAPITOL_HEIGHTS("G02", null, 91, "Capitol Heights", false, BLUE),
    CAPITOL_SOUTH("D05", null, 59, "Capitol South", false, BLUE, ORANGE),
    CHEVERLY("D11", null, 66, "Cheverly", false, ORANGE),
    CLARENDON("K02", null, 97, "Clarendon", false, ORANGE),
    CLEVELAND_PARK("A05", null, 8, "Cleveland Park", false, RED),
    COLLEGE_PARK_U_OF_MD("E09", null, 79, "College Park-U of MD", false, GREEN),
    COLUMBIA_HEIGHTS("E04", null, 75, "Columbia Heights", false, GREEN, YELLOW),
    CONGRESS_HEIGHTS("F07", null, 86, "Congress Heights", false, GREEN),
    COURT_HOUSE("K01", null, 96, "Court House", false, ORANGE),
    CRYSTAL_CITY("C09", null, 45, "Crystal City", false, BLUE, YELLOW),
    DEANWOOD("D10", null, 65, "Deanwood", false, ORANGE),
    DUNN_LORING_MERRIFIELD("K07", null, 102, "Dunn Loring-Merrifield", false, ORANGE),
    DUPONT_CIRCLE("A03", null, 6, "Dupont Circle", false, RED),
    EASTERN_MARKET("D06", null, 60, "Eastern Market", false, BLUE, ORANGE),
    EAST_FALLS_CHURCH("K05", null, 100, "East Falls Church", false, ORANGE),
    EISENHOWER_AVENUE("C14", null, 49, "Eisenhower Avenue", false, YELLOW),
    FARRAGUT_NORTH("A02", null, 4, "Farragut North", false, RED),
    FARRAGUT_WEST("C03", null, 38, "Farragut West", false, BLUE, ORANGE),
    FEDERAL_CENTER_SW("D04", null, 58, "Federal Center SW", false, BLUE, ORANGE),
    FEDERAL_TRIANGLE("D01", null, 53, "Federal Triangle", false, BLUE, ORANGE),
    FOGGY_BOTTOM_GWU("C04", null, 40, "Foggy Bottom-GWU", false, BLUE, ORANGE),
    FOREST_GLEN("B09", null, 32, "Forest Glen", false, RED),
    FORT_TOTTEN("B06", "E06", 28, "Fort Totten", false, GREEN, RED, YELLOW),
    FRANCONIA_SPRINGFIELD("J03", null, 95, "Franconia-Springfield", true, BLUE),
    FRIENDSHIP_HEIGHTS("A08", null, 11, "Friendship Heights", false, RED),
    GALLERY_PL_CHINATOWN("B01", "F01", 21, "Gallery Pl-Chinatown", false, GREEN, RED, YELLOW),
    GEORGIA_AVE_PETWORTH("E05", null, 76, "Georgia Ave-Petworth", false, GREEN, YELLOW),
    GLENMONT("B11", null, 34, "Glenmont", true, RED),GREEN_CDBELT("E10", null, 80, "Greenbelt", true, GREEN),
    GROSVENOR_STRATHMORE("A11", null, 14, "Grosvenor-Strathmore", false, RED),
    HUNTINGTON("C15", null, 50, "Huntington", true, YELLOW),
    JUDICIARY_SQUARE("B02", null, 23, "Judiciary Square", false, RED),
    KING_STREET("C13", null, 48, "King Street", false, BLUE, YELLOW),
    LANDOVER("D12", null, 67, "Landover", false, ORANGE),
    LARGO_TOWN_CENTER("G05", null, 109, "Largo Town Center", true, BLUE),
    L_ENFANT_PLAZA("D03", "F03", 82, "L'Enfant Plaza", false, BLUE, GREEN, ORANGE, YELLOW),
    MCPHERSON_SQUARE("C02", null, 36, "McPherson Square", false, BLUE, ORANGE),
    MEDICAL_CENTER("A10", null, 13, "Medical Center", false, RED),
    METRO_CENTER("A01", "C01", 1, "Metro Center", false, BLUE, ORANGE, RED),
    MINNESOTA_AVE("D09", null, 64, "Minnesota Ave", false, ORANGE),
    MORGAN_BOULEVARD("G04", null, 110, "Morgan Boulevard", false, BLUE),

    MT_VERNON_SQ_7TH_ST_CONVENTION_CENTER("E01", null, 70, "Mt Vernon Sq 7th St-Convention Center", false, GREEN, YELLOW),
    NAVY_YARD("F05", null, 84, "Navy Yard", false, GREEN),
    NAYLOR_ROAD("F09", null, 87, "Naylor Road", false, GREEN),
    NEW_CARROLLTON("D13", null, 68, "New Carrollton", true, ORANGE),
    NEW_YORK_AVE_FLORIDA_AVE_GALLAUDET_U("B35", null, 108, "New York Ave-Florida Ave-Gallaudet U", false, RED),
    PENTAGON("C07", null, 43, "Pentagon", false, BLUE, YELLOW),
    PENTAGON_CITY("C08", null, 44, "Pentagon City", false, BLUE, YELLOW),
    POTOMAC_AVE("D07", null, 61, "Potomac Ave", false, BLUE, ORANGE),
    PRINCE_GEORGE_S_PLAZA("E08", null, 78, "Prince George's Plaza", false, GREEN),
    RHODE_ISLAND_AVE_BRENTWOOD("B04", null, 26, "Rhode Island Ave-Brentwood", false, RED),
    ROCKVILLE("A14", null, 17, "Rockville", false, RED),
    RONALD_REAGAN_WASHINGTON_NATIONAL_AIRPORT("C10", null, 93, "Ronald Reagan Washington National Airport", false, BLUE, YELLOW),
    ROSSLYN("C05", null, 41, "Rosslyn", false, BLUE, ORANGE),
    SHADY_GROVE("A15", null, 18, "Shady Grove", true, RED),
    SHAW_HOWARD_U("E02", null, 72, "Shaw-Howard U", false, GREEN, YELLOW),
    SILVER_SPRING("B08", null, 31, "Silver Spring", false, RED),
    SMITHSONIAN("D02", null, 54, "Smithsonian", false, BLUE, ORANGE),
    SOUTHERN_AVENUE("F08", null, 107, "Southern Avenue", false, GREEN),
    STADIUM_ARMORY("D08", null, 63, "Stadium-Armory", false, BLUE, ORANGE),
    SUITLAND("F10", null, 88, "Suitland", false, GREEN),TAKOMA("B07", null, 29, "Takoma", false, RED),
    TENLEYTOWN_AU("A07", null, 10, "Tenleytown-AU", false, RED),
    TWINBROOK("A13", null, 16, "Twinbrook", false, RED),
    UNION_STATION("B03", null, 25, "Union Station", false, RED),

    U_STREET_AFRICAN_AMER_CIVIL_WAR_MEMORIAL_CARDOZO("E03", null, 73, "U Street/African-Amer Civil War Memorial/Cardozo", false, GREEN, YELLOW),
    VAN_DORN_STREET("J02", null, 94, "Van Dorn Street", false, BLUE),
    VAN_NESS_UDC("A06", null, 9, "Van Ness-UDC", false, RED),
    VIENNA_FAIRFAX_GMU("K08", null, 103, "Vienna/Fairfax-GMU", true, ORANGE),
    VIRGINIA_SQUARE_GMU("K03", null, 98, "Virginia Square-GMU", false, ORANGE),
    WATERFRONT_SEU("F04", null, 83, "Waterfront-SEU", false, GREEN),
    WEST_FALLS_CHURCH_VT_UVA("E07", null, 101, "West Falls Church-VT/UVA", false, GREEN),
    WEST_HYATTSVILLE("K06", null, 77, "West Hyattsville", false, ORANGE),
    WHEATON("B10", null, 33, "Wheaton", false, RED),WHITE_FLINT("A12", null, 15, "White Flint", false, RED),
    WOODLEY_PARK_ZOO_ADAMS_MORGAN("A04", null, 7, "Woodley Park-Zoo/Adams Morgan", false, RED),
    UNKNOWN("UNKNOWN", null, -1, "UNKNOWN", false, TrainLine.UNKNOWN);

    private final String apiCode;
    private final String apiAltCode;
    private final String name;
    private final String[] routeCodes;

    private TrainStation(final String apiCode, final String apiAltCode, final int webId, final String name, final boolean endOfLine, final Route... routes) {
        this.apiCode = apiCode;
        this.apiAltCode = apiAltCode;
        this.name = name;
        this.routeCodes = new String[routes.length];

        for (int i = 0; i < routes.length; i++) {
            this.routeCodes[i] = routes[i].getCode();
        }
    }

    public String getCode() {
        return apiCode;
    }

    public String getAltCode() {
        return apiAltCode;
    }

    public String getName() {
        return name;
    }

    public String[] getRouteCodes() {
        return routeCodes;
    }
}
